package org.querycreator.operator;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;

/**
 * Implements the > Operator
 * 
 * @author Luciano Molinari
 *
 */
public class GreaterThanOperator implements Operator {
	private static final long serialVersionUID = -1557559471025165483L;

	public Criterion createCriterion(String fieldName, Object fieldValue) {
		return Restrictions.gt(fieldName, fieldValue);
	}

	public String createSql(String fieldName) {
		return fieldName + " > ?";
	}

}
